<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<%@ include file="/resource/include/link_css.jsp"%>
<%@ include file="/resource/include/hander.jsp"%>

<%@ include file="/resource/include/sidebar.jsp"%>


<div class="content-inner">
    <!-- Page Header-->
    <header class="page-header">
        <div class="container-fluid">
            <h2 class="no-margin-bottom">${questionnaire.questionnairetitle} 结果统计</h2>
        </div>
    </header>
    <!-- Breadcrumb-->
    <div class="breadcrumb-holder container-fluid">
        <ul class="breadcrumb">

        </ul>
    </div>
    <!-- Forms Section-->
    <section class="forms">
        <div class="container-fluid">
            <div class="row">
                <div  class="col-lg-3">
                   <h1 style="font-size: 30px">共${sum}人作答</h1>
                    <form style="display: none" id="statistics" action="statisticsQuestion.do" method="post" >
                        <input type="number" name="nid"  id="nid" value="${questionnaire.nid}">
                        <input type="number" name="qid" id="qid" >
                        <input type="number" name="sum"  value="${sum}"  >
                    </form>
                    <table style="font-size:20px ">
                        <c:forEach  items="${questionsInfo.list}" var="question">

                                <tr>
                                    <td>
                                        <button style="border:none" id="${question.qid}" >第${question.questioncode}题
                                                ${question.questionheading}</button>
                                    </td>
                                </tr>

                        </c:forEach>
                    </table>
                </div>
                <!-- Basic Form-->
                <div  class="col-lg-6">
                    <div id="container1" style=" width: 500px;height: 300px;"></div>
                </div>

            </div>
        </div>
    </section>

</div>
</div>
</div>

<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("button").click(function(){
            // alert($(this).attr("id"))
            $("#qid").val($(this).attr("id"));
            //提交查询的表单
            $("#statistics").submit();
        });
    });

</script>


<!-- JavaScript files-->
<script src="../resource/vendor/jquery/jquery.min.js"></script>
<script src="../resource/vendor/popper.js/umd/popper.min.js"> </script>
<script src="../resource/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="../resource/vendor/jquery.cookie/jquery.cookie.js"> </script>
<script src="../resource/vendor/chart.js/Chart.min.js"></script>
<script src="../resource/vendor/jquery-validation/jquery.validate.min.js"></script>
<!-- Main File-->
<script src="../resource/js/front.js"></script>
</body>
</html>